package com.lgc.javathread.threadPoolTest;

import java.util.concurrent.Callable;

public class MyCallable implements Callable {

    private int taskNum;
    public MyCallable(int taskNum){
        this.taskNum=taskNum;
    }

    @Override
    public Integer call() throws Exception {
        System.out.println("正在执行task "+taskNum);
        try {
            Thread.sleep(1000);
        }catch (Exception e)
        {
            e.printStackTrace();
        }
        return 1;//"执行结束task "+taskNum;
    }
}
